macromedia Your Account International Help
Products Support & Training DevNet Solutions Partners Downloads Store
Products Support & Training DevNet Solutions Partners Downloads Store
Home > Products > Dreamweaver > Support > TechNote Index
Macromedia Dreamweaver Support Center - TechNote

Changing Access database permissions in Windows

Issue
When using a Microsoft Access database file as the database for a web application, insufficient permissions can result in one or more of the following error messages:

"Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't use '(unknown)'; file already in use."

-or-

"Microsoft OLE dB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data."

-or-

"Microsoft OLE dB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file. "

Note: The error messages listed are from an Access 97 database. Similar error messages should appear from other Access database versions.

Reason
This is a Windows NT permissions issue. The account that is accessing the page does not have sufficient permissions to lock the database. The account would be either the anonymous account (by default the IUSR_computername) or a specific user account if the page has been secured for authenticated access.

Database file permissions must be adjusted to give the appropriate user account the correct permissions so that the web server can access the database. If the database is stored on a server, the folder where it is stored must also have certain permissions set in order to write to that database.

Solution
If the page is meant to be accessed anonymously, give the IUSR_computername account full control of the folder where the database is located and of the database file itself. Additionally, if the path to the database is being referenced using UNC (\\Server\Share), ensure that the Share Permissions allow the IUSR_computername account full access. This step applies even if the share is on the local web server. If you are copying the database from another location, it may not automatically inherit the permissions from the folder you are putting it in. The permissions may need to be set for the database itself within Windows.

The following section provides steps to change the database permissions on the folders and files. The instructions are valid for default configurations of the operating systems. Please note that configuration differences may cause the instructions to vary. The version of Windows covered are the following:

> Windows 2000 and Windows NT
> Windows XP

Note: The account needs permissions of Create, Destroy, Read, Write to work with the LDB (database lock) file. Specific permission can be applied to the database to limit access.

Windows 2000 and NT instructions:
1 Locate the database file or the folder the database is contained in within Windows Explorer. Right-click the file or folder and select Properties.
2 Select the Security tab if using Windows 2000. If you are using Windows NT, select the Security tab and then the Permissions button.
3 In the File Permissions dialog box, click the ADD button to add the IUSR_computername account to the list of accounts if it's not already listed.
4 In the Look In drop down list, select the computer name of the workstation or server. Scroll through the list, select the IUSR_computername account and click Add.
5 Click OK to accept changes, and add the account to the permissions list.
4 Once the account is listed, make sure Full Control is checked and click OK.

Windows XP instructions:
1 Locate the database file or the folder the database is contained in within Windows Explorer. Right-click the file or folder and select Properties.
2 Select the Security tab and click Add. The Security tab on Windows XP can sometimes be hidden. Follow these steps to enable the Security tab:
 
> Select Tools > Folder Options in Windows Explorer.
> Locate and clear the 'Use simple file sharing (Recommended) option in the Advance Settings of the View tab.

Note: For more information visit Microsoft's Use Access Control to Restrict Who Can Use Files page.
3 In the Select Users or Group dialog box switch to the advanced view if necessary. Click on the Advanced button if available.
4 Verify that the Built-in Security Principals is listed in the Select This Object Types property. Click the Object Types button and check the appropriate selection if needed.
5 Click the Find Now button to list all accounts that match the criteria.
5 Locate and select the IUSR_computername account from the list generated and click the OK button to add the account to the permissions list.
4 Apply the change by clicking the Apply button.

Note: You may need to change permissions for the system's temporary directory, as Access also uses that directory. Please refer to the Microsoft KnowledgeBase article Q253604 on this topic.

Note: For added security, within IIS or the web server being used, permissions can be set so that Read permission is turned off for the web folder in which the database is contained. Browsing the folder won't be permitted, but the web pages will be able to access the database.

Additional information
> For more details about the IUSR_computername account and Web server permissions, please refer to Understanding Anonymous Authentication and the ISUR Account (UltraDev TechNote 15378) and Setting Web Server Permissions (UltraDev TechNote 15376)
> For more information on problems relating to IIS, folder or share permissions when using a Microsoft Access database, refer to 80004005 – Microsoft Jet database engine cannot open the file (unknown) (UltraDev TechNote 14476)
> For Access database security settings on ColdFusion datasources, please refer to ColdFusion MX: Data source settings needed to connect to Microsoft Access databases (ColdFusion TechNote 18304)


ID: 18802
Product: Dreamweaver
Versions: All
OS: Windows-All
Browser: All
Server: None
Database: Access
Former ID:  
How useful was this document?
less more

1

2

3

4

5

How can the document be improved? (300 characters or less - you will not receive a reply.)

Last updated: July 30, 2003
Created: July 30, 2003